﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyGame2
{
    public partial class fromGameOver : Form
    {
        string Type = "";
        string Time = "";
        public fromGameOver(string overType,string time)
        {
            Type = overType;
            Time = time;
            InitializeComponent();
        }

        public fromGameOver()
        {
            InitializeComponent();
        }

        private void btnGameOver_Click(object sender, EventArgs e)
        {
            FrmMain.gameStartType = "1";
            this.Close();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            FrmMain.gameStartType = "0";
            Application.Exit();
        }

        private void btnRestart_Click(object sender, EventArgs e)
        {
            FrmMain.gameStartType = "2";
            this.Close();
        }

        private void fromGameOver_Load(object sender, EventArgs e)
        {
            lblDate.Text = DateTime.Now.ToString("G");
            lblTime.Text = Time;
            if (Type == "Success") 
            {
                this.Text = "装B成功";
                lblTitle.Text = "你为何这么叼！";
                System.Resources.ResourceManager manager = new System.Resources.ResourceManager("MyGame2.Properties.Resources", System.Reflection.Assembly.GetExecutingAssembly());
                Bitmap images = ((Bitmap)(manager.GetObject("Success")));
                picIco.Image = images;
            }
        }
    }
}
